<%@page import="com.metagurukul.metagranth.service.TagService"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%
	if(request.getParameter("q")!=null){
	String query = request.getParameter("q");
	List<String> tags = TagService.getTagNameList(query);
	Iterator<String> iterator = tags.iterator();
	while(iterator.hasNext()) {
		String tag = (String)iterator.next();
		out.println(tag);
	}
	} else {
		response.sendRedirect("home.jsp");
	}
%>